]> dgit.raspbian.org Git - gnome-shell.git/commit
switcherPopup: Lookup index of items when hovering or clicking
authorJonas Dreßler <verdre@v0yd.nl>
Wed, 15 Jan 2020 15:19:41 +0000 (16:19 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Wed, 26 Feb 2020 22:46:51 +0000 (22:46 +0000)
commitbf213af362d8ecf88a5e1c8af3d264470caf32a6
treeebd751a661684087608c46d28b7a0df00c2b0a94
parentbfb0bc7a291af8ba75ab3d8c99bc1616e08db536
switcherPopup: Lookup index of items when hovering or clicking

Right now the index that gets selected on click and motion events is set
when connecting the event inside the addItem function. If items are
added or removed (for example when an application is closed by pressing
"q"), this index isn't valid anymore and has to be updated.

To fix this, use the items themselves instead of the index as arguments
for the event handlers and lookup the index of the item inside the event
handler.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/167
js/ui/altTab.js
js/ui/switcherPopup.js